#!/usr/bin/python3
# _*_ coding: utf-8 _*_
#
# Copyright (C) 2024 - 2024 heihieyouheihei, Inc. All Rights Reserved 
#
# @Time    : 2024/9/26 16:27
# @Author  : Yuyun
# @File    : practice_01.py
# @IDE     : PyCharm
import re


log ="""
now:2020-04-15 23: 44: 34 id: ST0013  status: nok 
now:2020-04-16 09:33:14 id: DAMX002  status: good
now:2020-04-17 22: 27: 39 id: SIMKDIF0 status: well
now:2020-04-18 16: 45:30 id: 04  status:  unknown 
"""
pattern_01 = 'now:(\d{4}-\d{2}-\d{2})\s+(\d{2}:\s*\d{2}:\s*\d{2})'
date = re.findall(pattern_01, log)
pattern_02 = 'id:\s*(\w*\d+)'
id = re.findall(pattern_02, log)
pattern_03 = 'status:\s*(\w+)'
status = re.findall(pattern_03,log)
print(status)